<include file="Public:header" />
<style type="text/css">
    .house_type li{
        float: left;
    }
</style>
<!--添加户型-->
<form id="info_form" action="{:U('HouseType/add')}" method="post" enctype="multipart/form-data">
<input type="hidden" name="house_id" id="house_id" value="{$info.id}" />
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">基本信息</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">所属楼盘 :</th>
                        <td>
                            <span id="housename">{$info.title}</span>
                        </td>
                    </tr>

		            <tr>
						<th>户型名称 :</th>
						<td>
							<input type="text" name="name" id="J_title" class="input-text" size="40">
					        <!--input type="hidden" value="" name="color" id="J_color">
					        <a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_title" data-ic="J_color" src="__IMG__/color.png"></a-->
		                </td>
					</tr>
                    <tr>
                        <th>户型 :</th>
                        <td>
                            <input type="text" name="room" id="room" class="input-text" size="5"/><span>室</span>
                            <input type="text" name="hall" id="hall" class="input-text" size="5"/><span>厅</span>
                            <input type="text" name="toilets" id="toilets" class="input-text" size="5"/><span>卫</span>
                            <input type="text" name="kitchen" id="kitchen" class="input-text" size="5"/><span>厨</span>
                            <input type="text" name="balcony" id="balcony" class="input-text" size="5"/><span>阳台</span>
                        </td>
                    </tr>
                    <tr>
                        <th>面积 :</th>
                        <td>
                            建筑面积 :<input type="text" name="area" id="area" class="input-text" size="5"/><span>平米</span>
                            套内面积 :<input type="text" name="inside_area" id="inside_area" class="input-text" size="5"/><span>平米</span>
                            公摊面积 :<input type="text" name="the_pool" id="the_pool" class="input-text" size="5"/><span>平米</span>
                        </td>
                    </tr>
                    <tr>
                       <th>价格 :</th>
                        <td>
                            总价 :<input type="text" name="price" id="price" class="input-text" size="5"/><span>万元</span>
                            朝向 :
                            {:getLinkMenu(17,'sale_status','select')}
                        </td>
                    </tr>
                    <tr>
                        <th>销售状态 :</th>
                        <td>
                            {:getLinkMenu(18,'sale_status','select')}
                        </td>
                    </tr>
                    <tr>
                        <th>楼栋选择 :</th>
                        <td>
                            <ul class="house_type">
                                <volist name='property' id='vo'>
                                    <li><label><input name="property[]" value="{$vo.id}" type="checkbox"> {$vo.title}</label></li>
                                </volist>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <th>户型特色 :</th>
                        <td><textarea name="characteristic" id="characteristic" style="width:500px;height:50px;resize: none;"></textarea></td>
                    </tr>
                    <tr>
                        <th>户型解析 :</th>
                        <td><textarea name="analytical" id="analytical" style="width:500px;height:50px;resize: none;"></textarea></td>
                    </tr>

                    <tr>
                        <th>户型图片 :</th>
                        <td><script id="uploadpic" name="uploadpic" type="text/plain"></script>
                           <input type="button" class="btn btn_submit" style="margin:0 0 10px 10px;" onclick="upImage();" value="选择图片">
                            <div id="imageList">
                                <ul class="list clearfix">
                                </ul>
                            </div>
                        <input type="hidden" name="file" id="file" />
                        </td>
                    </tr>
                    <tr>
                        <th>主力户型  :</th>
                        <td>
                            <label><input type="radio" name="is_rec" class="radio_style" value="1" checked="checked"> {:L('yes')} </label>&nbsp;&nbsp;
                            <label><input type="radio" name="is_rec" class="radio_style" value="0" > {:L('no')}</label>
                        </td>
                    </tr>
					<tr>
						<th>{:L('publish')} :</th>
		 				<td>
		                	<label><input type="radio" name="status" class="radio_style" value="1" checked="checked"> {:L('yes')} </label>&nbsp;&nbsp;
							<label><input type="radio" name="status" class="radio_style" value="0" > {:L('no')}</label>
						</td>
					</tr>
				</table>
			</div>

            </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
<include file="Public:footer" />
<js file="__STATIC__/ueditor/ueditor.config.js" charset="utf-8" />
<js file="__STATIC__/ueditor/ueditor.all.min.js" charset="utf-8" />
<js file="__STATIC__/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" />
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
    window.onload=function(){
            upmoreimg();
    }
</script>
<js file="__STATIC__/js/calendar/WdatePicker.js" charset="utf-8" />
<script type="text/javascript">
    var check_name_url = "{:U('HouseType/ajaxCheckTitle')}";
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#J_title").formValidator({onshow:"请填写户型名称",onfocus:"请填写户型名称"}).inputValidator({min:1,onerror:"请填写户型名称"}).ajaxValidator({
            type : "get",
            url : check_name_url,
            datatype : "json",
            async:'false',
            success : function(result){
                if(result.status == 0){
                    return false;
                }else{
                    return true;
                }
            },
            buttons: $("#dosubmit"),
            onerror : "请填写户型名称",
            onwait : "正在验证"
        });
    });

   </script>
<js file="__JS__/uploadImg.js" charset="utf-8" />
</body>
</html>